import type { FetchFn } from 'chatgpt';

/**
 * Interface representing the context of a chat conversation.
 */
export interface ChatContext {
	conversationId?: string;
	parentMessageId?: string;
}

/**
 * Options for configuring the unofficial ChatGPT proxy API.
 */
export interface ChatGPTUnofficialProxyAPIOptions {
	accessToken: string;
	apiReverseProxyUrl?: string;
	model?: string;
	debug?: boolean;
	headers?: Record<string, string>;
	fetch?: FetchFn;
}

/**
 * Configuration options for the model.
 */
export interface ModelConfig {
	apiModel?: ApiModel;
	reverseProxy?: string;
	timeoutMs?: number;
	socksProxy?: string;
}

/**
 * Enum representing the possible API models.
 */
export enum ApiModel {
	ChatGPTAPI = 'ChatGPTAPI',
	ChatGPTUnofficialProxyAPI = 'ChatGPTUnofficialProxyAPI',
}

export type ApiModelType = ApiModel | undefined;

